package cn.wongshu.student.service;

import cn.wongshu.student.dao.ArticleDao;
import cn.wongshu.student.pojo.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleService {

    @Autowired
    private ArticleDao articleDao;


    public List<Article> findAll() {

        System.out.println(articleDao == null);
        return  articleDao.findAll();

    }

    public Article findById(Integer id) {

        return articleDao.findById(id);
    }


}
